const MyEmitter=require("events");
const myEmitter=new MyEmitter();

//事件绑定监听器处理
myEmitter.on("event_name",function(a,b){
    console.log(a,b,this,this===myEmitter);
})
//事件发射器
myEmitter.emit("event_name","a","b");